<?php
?>
<div class="col-lg-8">
        <h2>Liste des News</h2>

        <center><a href="href='?controleur=News&action=ajouter" class="btn btn-warning" >Ajouter une news</a></center>
        <br><br/>
       
        
        <table class="table table-bordered table-condensed">
            <tr class="alert-warning">
                <td>Titre</td>
                <td>Texte</td>
                <td>Date de Creation</td>
                <td>A</td>
                <td>Modification</td>
                <td>Suppression</td>
            </tr>

            <?php
            //parcours de la liste lesNews
            foreach (VariablesGlobales::$lesNews as $nb => $uneNews) {
               
                //Affichage des informations
                echo "<tr><td>$uneNews->titre</td>";
                echo "<td>$uneNews->texte</td>";
                echo "<td>$uneNews->date</td>";
                 echo "<td>$uneNews->HMS</td>";
                echo "<td><center><a href='?controleur=News&action=modifier&id=$uneNews->id' class='glyphicon glyphicon-edit'></a></center></td>";
                echo "<td><center><a href='?controleur=News&action=supprimer&id=$uneNews->id' class='glyphicon glyphicon-remove'></a></center></td></tr>";
            }
            ?>
        </table>
    </div>
<?php
        ?>
